<?php echo $this->fetch('member.header.html'); ?>
<style type="text/css">
.table table {width: 100%; border-collapse: collapse;}
.my_friend {width: 100%;}
.all_btn {width: 753px; height: 36px; line-height: 32px; padding-left: 15px; position: relative;}
.all_bg_up { background: url(<?php echo $this->res_base . "/" . 'images/member/line_bold.gif'; ?>) repeat-x 0 bottom; }
.all_bg_down {border-top: 2px solid #e2e2e2;}
.all_btn label {float: left; margin-right: 10px;}
.all_btn label input {vertical-align: middle; position: relative;}
.all_btn .note { float: left; color: #919191; padding-left: 15px; background: url(<?php echo $this->res_base . "/" . 'images/member/ico.gif'; ?>) no-repeat 0 -975px; }
.all_btn .note:hover {color: red;}
.all_btn .delete { float: left; padding-left: 25px; color: #919191; background: url(<?php echo $this->res_base . "/" . 'images/member/ico.gif'; ?>) no-repeat 10px -623px; }

.my_friend .list {width: 738px; padding: 30px 0 0 30px; border-bottom: 1px solid #e2e2e2; margin-bottom: 1px;}
.my_friend .list li {width: 300px; float: left; padding-bottom: 30px;}
.my_friend .list li p {width: 50px; height: 50px; float: left; margin-right: 10px; background: #eee;}
.my_friend .list li h3 {float: left; font-weight: normal; font-size: 12px;}
.my_friend .list li h3 b {display: block; width: 200px; height: 18px; font-weight: normal; overflow: hidden; margin-bottom: 10px; color: #5ba439; position: relative;}
.my_friend .list li h3 b input {margin-right: 5px; position: relative; top: 1px;}
.my_friend .list li h3 span {display: block;}
.my_friend .list .note { float: left;padding-left: 15px; background: url(<?php echo $this->res_base . "/" . 'images/member/ico.gif'; ?>) no-repeat 0 -984px; }
.my_friend .list .note:hover {color: red;}
.my_friend .list .delete {float: left; margin-left: 10px;color: #919191;}
.member_no_records{color: #F00; padding: 35px 0px 5px 0px; text-align:center; font-weight: bold; font-size:14px;font-family:'Microsoft Yahei'}
</style>
<div class="content_color">
<div class="content">
    <?php echo $this->fetch('member.menu.html'); ?>
    <div id="right">
        <?php echo $this->fetch('member.submenu.html'); ?>
        <div class="wrap">
            <div class="eject_btn" title="添加好友"><b class="ico3" ectype="dialog" dialog_id="friend_add" dialog_title="添加好友" uri="index.php?app=friend&act=add" dialog_width="400">添加好友</b></div>
            <div class="public table">
                <div class="my_friend">
                    <?php if ($this->_var['friends']): ?>
                    <div class="all_btn all_bg_up">
                        <label for="all"><input type="checkbox" id="all" class="checkall"/> 全选</label>
                        <a href="javascript:void(0);" class="note" uri="index.php?app=message&amp;act=send" name="to_id" ectype="batchbutton">短消息</a>
                        <a href="javascript:void(0);" class="delete" uri="index.php?app=friend&act=drop" name="user_id" presubmit="confirm('您确定要删除它吗？\n\n注意：删除后不可恢复！\n\n不想删除请点击取消')" ectype="batchbutton">删除</a>
                    </div>
                    <?php endif; ?>                    
                    <ul <?php if ($this->_var['friends']): ?>class="list"<?php endif; ?>>
                    <?php $_from = $this->_var['friends']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'friend');if (count($_from)):
    foreach ($_from AS $this->_var['friend']):
?>
                        <li>
                            <p><img src="<?php echo $this->_var['friend']['portrait']; ?>" width="50" height="50" alt="" /></p>
                            <h3>
                                <b><label><input type="checkbox" class="checkitem" value="<?php echo $this->_var['friend']['user_id']; ?>"/><?php echo htmlspecialchars($this->_var['friend']['user_name']); ?></label></b>
                                <span>
                                    <a href="<?php echo url('app=message&act=send&to_id=' . $this->_var['friend']['user_id']. ''); ?>" class="note">短消息</a>
                                    <a href="javascript:drop_confirm('您确定要删除它吗？\n\n注意：删除后不可恢复！\n\n不想删除请点击取消', 'index.php?app=friend&amp;act=drop&user_id=<?php echo $this->_var['friend']['friend_id']; ?>');" class="delete">删除</a>
                                </span>
                            </h3>
                        </li>
                     <?php endforeach; else: ?>
                        <li class="member_no_records" style="text-align:center;width:100%;"><?php echo $this->_var['lang'][$_GET['act']]; ?>您还没有添加好友</li>
                     <?php endif; unset($_from); ?><?php $this->pop_vars();; ?>
                        <div class="clear"></div>
                    </ul>
                    <?php if ($this->_var['friends']): ?>
                    <div class="all_btn all_bg_down">
                        <label for="all2"><input type="checkbox" id="all2" class="checkall"/> 全选</label>
                        <a href="javascript:void(0);" class="note" uri="index.php?app=message&amp;act=send" name="to_id" ectype="batchbutton">短消息</a>
                        <a href="javascript:void(0);" class="delete"  uri="index.php?app=friend&act=drop" name="user_id" presubmit="confirm('您确定要删除它吗？\n\n注意：删除后不可恢复！\n\n不想删除请点击取消')" ectype="batchbutton">删除</a>
                    </div>
                    <div class="pages">
                        <?php echo $this->fetch('member.page.bottom.html'); ?>
                    </div>
                    <?php endif; ?>
                </div>
            </div>
        </div>
        <div class="clear"></div>
    </div>
    <div class="clear"></div>
</div>
</div>
<iframe id='iframe_post' name="iframe_post" src="about:blank" frameborder="0" width="0" height="0"></iframe>
<?php echo $this->fetch('footer_member.html'); ?>
